<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/12/15
  Time: 13:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>login</title>
</head>
<body>
<h1 style="text-align: center;">请登录</h1>
<form action="login" method="post"
      style="width: 250px; margin: 20px auto;">
    <%
        String username = request.getParameter("username");
        Object message = request.getAttribute("message");
        if (message != null) {
            out.println(message);
        }
        if (username == null) {
            username = "";
        }
    %>
    <br>
    账号：<input name="username" value="<%=username %>"><br>
    密码：<input type="password" name="password"><br><br>
    <button type="submit">sign in</button>
    <br>
    <a href="register">还没有账号？注册</a>
</form>
</body>
</html>
